package edu.gdit.health.controller;

import edu.gdit.health.base.Results;
import edu.gdit.health.model.LoggingEvent;
import edu.gdit.health.service.LoggingEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("LoggingEvent")
public class LoggingEventController {
    @Autowired
    private LoggingEventService loggingEventService;
    @RequestMapping("getAll")
    public Results<LoggingEvent> getAll(int page,int limit){

        return loggingEventService.getAll(page==0?1:page, limit);
    }
}
